cmake_minimum_required(VERSION 3.20)

#get current directory name, and replace space key with '-'
get_filename_component(CUR_PROJ_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
string(REPLACE " " "-" CUR_PROJ_NAME "${CUR_PROJ_NAME}")

project(${CUR_PROJ_NAME})

add_subdirectory(hello-world)

aux_source_directory(${${PROJECT_NAME}_SOURCE_DIR} ${PROJECT_NAME}_SRCS)

add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_SRCS})
target_link_libraries(${PROJECT_NAME} PRIVATE hello-world)

